package com.henu.action;

import org.smart4j.framework.mvc.DataContext;
import org.smart4j.framework.mvc.annotation.Action;
import org.smart4j.framework.mvc.annotation.Request;
import org.smart4j.framework.mvc.bean.Result;
import org.smart4j.framework.mvc.bean.View;


@Action
public class HelloAction {

    @Request.Get("/hello")
    public Result sayHello() {
        System.out.println("hello");
        System.out.println(DataContext.Request.getAll());
        return new Result(true).data("hello world");
    }

    @Request.Get("/{main}.jsp")
    public View getStaticView(String main) {
        return new View(main + ".jsp");
    }
}
